version: '3.7'

services:

  postgres:
    image: postgres
    restart: always
    env_file:
      - ./.env
    volumes:
      - ./pgdata:/var/lib/postgresql/data
    ports:
      - '5433:5432'

  redis:
    image: redis
    restart: always
    ports:
     - '6378:6379'
    volumes:
      - ./redisdata:/var/lib/redis

  app:
    build: ./
    restart: always
    entrypoint: ./entrypoint.sh
    depends_on:
      - postgres
      - redis
    environment:
      REDIS_URL: redis://redis:6379
